<template>
    <div>
        <van-nav-bar left-arrow :fixed="true" @click-left="onClickLeft" :title="title"/>
        <div style="padding-top:2.7em;">
            <router-view/>
        </div>

    </div>
</template>
<script>
    import {NavBar} from 'vant';

    export default {
        components: {
            [NavBar.name]: NavBar
        },
        data() {
            return {
                title: '发布职位',
            }
        },
        methods: {
            onClickLeft() {
                switch (this.$router.history.current.fullPath) {
                    case '/checkWorkerInfo':
                        this.$router.push('/workerInfo');
                        break;
                    case '/workerInfo':
                        this.$router.push('/user');
                        break;
                    case '/checkJobInfo':
                        this.$router.push('/JobInfo');
                        break;
                    case '/JobInfo':
                        this.$router.push('/user');
                        break;
                    default:
                        this.$router.go(-1);

                }
            }
        }
    }
</script>
